<?php $this->page_title = $this->translate ( 'Messages sent' ) ;?>

<div id="default_header_section">
<h3><?=$this->translate ( 'Messages sent' );?></h3>
</div>

<?
if (count ( $this->mensajes ) > 0) {
	echo '<div class="success">';
	foreach ( $this->mensajes as $msg ) {
		echo $msg . '<br>';
	}
	echo '</div>';
}
?>

<div id="main">
<div class="span-18">

<ul id="tabnav">
        <?=$this->editprofile ?>
	<li ><a   id="<?=(preg_match("/received/", $_SERVER['REQUEST_URI']))?"tab_active":"lala"?>" href="/<?=$this->lang ?>/message/received"><?=$this->translate('received');?></a></li>
	<li ><a  id="<?=(preg_match("/sent/", $_SERVER['REQUEST_URI']))?"tab_active":"lala"?>" href="/<?=$this->lang ?>/message/sent"><?=$this->translate('sent');?></a></li>
</ul>


    <div class="user_profile">

<?php if ($this->listmessages): ?>

       <?php foreach ($this->paginator as $key => $val): ?>
        <div class="message_excerpt">

            <h4>
                <a href="/<?=$this->lang ?>/message/show/id/<?=$this->escape($val['id']) ?>">
           <?=$this->escape($val['subject']) ?> </a></h4>

          
            <span class="ad_date"><?=$this->translate('Sent'). $this->escape(date( $this->translate('l dS \o\f F Y H:i:s'), strtotime($val['date_created']))) ?>
            <?=$this->translate('to user') ?>


            <a href="/<?=$this->lang ?>/profile/<?=$this->escape($val['username']) ?>"><?=$this->escape($val['username']) ?></a>
            </span>

            <div class="delete_message">
            <a href="/<?=$this->lang ?>/message/show/id/<?=$this->escape($val['id']) ?>">
                <?=$this->translate('read this message') ?>
            </a></div>
            
             <div class="delete_message">
            <a href="/<?=$this->lang ?>/message/delete/id/<?=$this->escape($val['id']) ?>">
                <?=$this->translate('delete this message') ?>
            </a></div>
            

        </div>

        <?php endforeach; ?>
        <?php endif; ?>
    </div>


<?php echo $this->paginationControl($this->paginator,
                                    'Sliding',
                                    'partials/paginator_ads.phtml'); ?>
</div>



<div class="google_ads">
<!-- google adsense block -->
<script type="text/javascript"><!--
google_ad_client = "pub-7190437604389924";
/* 160x600, creado 9/01/10 */
google_ad_slot = "9535564204";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- end  of google adsense block -->
</div>
</div>